<?php

/**
 * DatosFacturacion filter form base class.
 *
 * @package    SAC_CLonsa
 * @subpackage filter
 * @author     Your name here
 */
abstract class BaseDatosFacturacionFormFilter extends BaseFormFilterPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'nombre_organizacion' => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'rut'                 => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'giro'                => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'direccion'           => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'telefono'            => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'fax'                 => new sfWidgetFormFilterInput(),
    ));

    $this->setValidators(array(
      'nombre_organizacion' => new sfValidatorPass(array('required' => false)),
      'rut'                 => new sfValidatorPass(array('required' => false)),
      'giro'                => new sfValidatorPass(array('required' => false)),
      'direccion'           => new sfValidatorPass(array('required' => false)),
      'telefono'            => new sfValidatorPass(array('required' => false)),
      'fax'                 => new sfValidatorPass(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('datos_facturacion_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'DatosFacturacion';
  }

  public function getFields()
  {
    return array(
      'id'                  => 'Number',
      'nombre_organizacion' => 'Text',
      'rut'                 => 'Text',
      'giro'                => 'Text',
      'direccion'           => 'Text',
      'telefono'            => 'Text',
      'fax'                 => 'Text',
    );
  }
}
